<?php 
$curr_controller = Yii::app()->controller->id;
$curr_action = Yii::app()->controller->action->id;
$bannerModel = Banner::model()->find('type=2 AND status=1');
?>
<!DOCTYPE html>
<html>
    <head>        
        <title><?php echo isset($this->pageTitle) ? $this->pageTitle : Yii::app()->name; ?></title>
        <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
        <meta name="ROBOTS" content="index,follow">
        <meta name="AUTHOR" content="Game.vn">
        <meta http-equiv="EXPIRES" content="0">
        <meta name="RESOURCE-TYPE" content="DOCUMENT">
        <meta name="DISTRIBUTION" content="GLOBAL">
        <meta name="COPYRIGHT" content="Copyright (c) by Esimo">
        <meta name="Googlebot" content="index,follow,archive">
        <meta name="RATING" content="GENERAL">
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">                
        
        <link rel="shortcut icon" href="<?php echo Yii::app()->createUrl('images/favicon.png');?>" />                
        <link href="<?php echo Yii::app()->baseUrl . '/css/style_j2me.css' ?>" type="text/css" rel="stylesheet" />        
        <?php Yii::app()->clientScript->registerCoreScript('jquery'); ?>                        
        <script type="text/javascript">
            baseUrl = '<?php echo Yii::app()->baseUrl; ?>';
        </script>
        <?php include_once'googleanalytic.php'; ?>           
    </head>
    <body>
        <div id="wapper">
            <div id="header">
                <div class="top-header">
                    <h1><a href="<?php echo Yii::app()->homeUrl; ?>"><img width="168px" height="40px" src="<?php echo Yii::app()->createUrl('images/logo.png') ?>"/></a></h1>                    
                </div>  
                <div class="nav">
                    <table style="width:100%">
                        <tbody>
                            <tr>
                                <td class="top-menu <?php if($curr_controller == "site" && $curr_action == "index") echo "nav_focus"; else echo "nav_normal" ?>"><a href="<?php echo Yii::app()->homeUrl ?>" class="nav_link">Tải game</a></td>
                                <td class="top-menu <?php if($curr_controller == "post" && $curr_action  == "news") echo "nav_focus"; else echo "nav_normal"; ?>"><a href="<?php echo Yii::app()->createUrl('post/news');?>" class="nav_link">Sự kiện</a></td>
                                <td class="top-menu <?php if($curr_controller == "post" && $curr_action == "guide") echo "nav_focus"; else echo "nav_normal" ?>"><a href="<?php echo Yii::app()->createUrl('post/guide');?>" class="nav_link">Hướng dẫn</a></td>                        
                            </tr>
                        </tbody>
                    </table>
		</div>
                
                <div class="clear-both"></div>
                <div class="bottom-header"></div>
            </div>        
            <?php if(isset($bannerModel)): ?>
            <marquee behavior="scroll" direction="left" onmouseover="stop()" onmouseout="start()">										
                <a style="text-decoration: none;" href="<?php echo $bannerModel->link; ?>"><?php echo $bannerModel->name ?></a>                         
            </marquee>
            <?php endif;?>
            <?php echo $content;?>        
            <div id="footer">
                <div class="copyright">@GAME 2014 - <span><a href="tel:01282357106"><b>Hotline: </b>01282357106</a></span> </div>                
            </div>
        </body>     
    </div>
</html>        